package pers.lance.jmsproject;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import pers.lance.jmsproject.client.JmsClient;
import pers.lance.jmsproject.pojo.User;

import java.util.Date;

public class AppClient {
    public static void main(String[] args) throws JsonProcessingException {
        User user = new User(2, "name2", "男", 12, new Date());
        ObjectMapper mapper = new ObjectMapper();
        String useJson = mapper.writeValueAsString(user);
        JmsClient jmsClient = new JmsClient();
        jmsClient.sendMessage(useJson);
    }
}
